import random
from openpyxl import Workbook

# 企业名字构成部分
business_prefix = [
    "Global", "Advanced", "Creative", "Dynamic", "NextGen", "Prime", "Smart",
    "International", "Tech", "Vision", "Eco", "Green", "Future", "First",
    "Alpha", "Pro", "Ultra", "Strategic"
]
business_middle = ["Solution", "Systems", "Services", "Technologies",
                   "Enterprise", "Industry", "Innovation", "Group",
                   "Network", "Consulting"]
business_suffix = ["Inc.", "LLC", "Ltd.", "Corp.", "Co.", "Pvt.", "Partners"]

# 自动生成企业名称
def generate_business_names(num):
    business_names = []
    while num:
        prefix = random.choice(business_prefix)
        middle = random.choice(business_middle)
        suffix = random.choice(business_suffix)
        name = f"{prefix} {middle} {suffix}"

        if name not in business_names:
            business_names.append(name)
            num -= 1
    return business_names

# 生成1000个随机企业名称
num_names = 1000
business_names = generate_business_names(num_names)

# 保存到Excel文件
def save_to_excel(file_name, data):
    wb = Workbook()
    ws = wb.active
    ws.title = "Business Names"
    ws.append(["Business Name"])  # 添加表头
    for name in data:
        ws.append([name])
    wb.save(file_name)

# 文件路径
file_name = "business_names.xlsx"
save_to_excel(file_name, business_names)
print(f"Generated {num_names} business names and saved to '{file_name}'")